<template>
  <view class="shopCardItem" @click="handleClick">
    <image :src="store.storeThumbnail" mode="aspectFill"></image>
    <view class="contentRight">
      <view class="title">{{ store.storeName ? store.storeName : '--' }}</view>
      <view class="region">
        {{ store.storeAddress ? store.storeAddress : '--' }}
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    store: {
      type: Object
    }
  },
  methods: {
    handleClick() {
      this.$emit('SHOP_CARD_CLICK', this.store)
    }
  }
}
</script>

<style lang="scss">
app-shop-card {
  display: block;
}
.shopCardItem {
  width: 100%;
  height: 140rpx;
  background: #ffffff;
  box-shadow: 0px 10rpx 40rpx 0px rgba(0, 0, 0, 0.1);
  border-radius: 40rpx;
  display: flex;
  align-items: center;
  overflow: hidden;
  image {
    width: 240rpx;
    height: 140rpx;
    margin-right: 32rpx;
  }
  .contentRight {
    flex: 1;
    .title {
      width: 415rpx;
      font-size: 30rpx;
      margin-bottom: 18rpx;
      @include text-ellipsis();
    }
    .region {
      width: 415rpx;
      font-size: 24rpx;
      @include text-ellipsis();
    }
  }
}
</style>
